<template>
  <div id="print">
    <div style="height:100%;page-break-after:always">
      <el-row :gutter="24" style="margin-bottom:20px;line-height: 1.5;">
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;text-align: right;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>实验批号：</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>{{ dataList.dto.batchNumber }}&nbsp</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;text-align: right;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>布板方案：</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>{{ dataList.dto.swatchId.data }}&nbsp</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;text-align: right;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>布板人员：</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>{{dataList.dto.swatchMan}}&nbsp</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;text-align: right;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>布板日期：</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>
            {{
            dataList.dto.swatchTime ? dataList.dto.swatchTime.substr(0, 10) : ""
            }}&nbsp
          </div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;text-align: right;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>质控品：</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>{{ dataList.dto.qualityControl?dataList.dto.qualityControl.data:'' }}&nbsp</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;text-align: right;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>实验项目：</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>{{ dataList.dto.experimentCode?dataList.dto.experimentCode.data:'' }}&nbsp</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;text-align: right;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>样本数量：</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>{{dataList.dto.sampleCount}}&nbsp</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;text-align: right;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>打印日期：</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>
            {{ new Date().getFullYear().toString() +
            "-" +
            ((new Date().getMonth() + 1).toString() < 10
            ? "0" + (new Date().getMonth() + 1).toString()
            : (new Date().getMonth() + 1).toString()) +
            "-" +
            (new Date().getDate().toString() < 10
            ? "0" + new Date().getDate().toString()
            : new Date().getDate().toString()) }}&nbsp
          </div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;text-align: right;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>打印人员：</div>
        </el-col>
        <el-col
          :span="4"
          style="padding: 0 !important;font-size: 14px;overflow-wrap: break-word;color: rgba(0, 0, 0, 0.95);"
        >
          <div>{{$store.state.account.user.name}}&nbsp</div>
        </el-col>
      </el-row>
      <!-- <div v-for="i in dataList.banTotal" :key="i"> -->
      <printBan
        ref="printBanRef"
        :banTotal="dataList.banTotal"
        :dataList="dataList.tableList"
        :rowList="dataList.rowList"
        :direction="dataList.direction"
        :columnList="dataList.columnList"
      ></printBan>
    </div>
    <!-- </div> -->
  </div>
</template>

<script>
import printBan from "./printBan.vue";

export default {
  components: {
    printBan
  },
  props: {
    dataList: {
      type: Object,
      default: () => {}
    }
  },
  mounted() {},
  methods: {}
};
</script>
